package com.yunji.baby.repayment.controller;


import com.yunji.baby.repayment.entity.TRepayment;
import com.yunji.baby.repayment.service.TRepaymentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 宝贝投
 * @since 2020-02-13
 */
@Api(tags = "还款模块")
@RestController
@RequestMapping("/finance/repayment")
public class TRepaymentController {
    @Autowired
    private TRepaymentService tRepaymentService;

    @ApiModelProperty("查询标的的还款列表信息")
    @PostMapping("/getByBorrowId")
    public List<TRepayment>getByBorrowId(
            @ApiParam(name = "borrowId",value = "借款标id",required = true)
            @RequestParam("borrowId") String borrowId){
        List<TRepayment> tRepaymentList = tRepaymentService.getByBorrowId(borrowId);
        return tRepaymentList;
    }
}

